﻿using System;
using System.Collections.Generic;
//
namespace PerceptiveMCAPI.Types
{
	public class listsResults
	{
		public int total { get; set; }
		public List<DataItem> data { get; set; }
		public listsResults()
		{
			data = new List<DataItem>();
		}
		// -------------------------------
		public class DataItem
		{
			public string id { get; set; }
			public double web_id { get; set; }
			public string name { get; set; }
			public DateTime date_created { get; set; }
			public bool email_type_option { get; set; }
			public bool use_awesomebar { get; set; }
			public string default_from_name { get; set; }
			public string default_from_email { get; set; }
			public string default_subject { get; set; }
			public string default_language { get; set; }
			public double list_rating { get; set; }
			public statistics stats { get; set; }
			public object modules { get; set; }
			// ---------------------------------------------------
			public DataItem()
			{
				date_created = DateTime.MinValue;
				stats = new statistics();
			}

			public override string ToString()
			{
				return string.Format( "id: {0}, name: {2}", id, name );
			}
			// ----------------
			public class statistics
			{
				public double member_count { get; set; }
				public double unsubscribe_count { get; set; }
				public double cleaned_count { get; set; }
				public double member_count_since_send { get; set; }
				public double unsubscribe_count_since_send { get; set; }
				public double cleaned_count_since_send { get; set; }
				//
				public double campaign_count { get; set; }
				public double grouping_count { get; set; }
				public double group_count { get; set; }
				public double merge_var_count { get; set; }
				public double avg_sub_rate { get; set; }
				public double avg_unsub_rate { get; set; }
				public double target_sub_rate { get; set; }
				public double open_rate { get; set; }
				public double click_rate { get; set; }
			}
			//
		}
	}
}
